package com.logback.demo;

import javax.validation.constraints.NotNull;

/**
 * @Author zqf
 * @Date 2023/3/21 14:48
 * @Description: 人
 */

public class People {

    private String name;


    private Integer age;


    public People(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public People() {
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @NotNull
    public People setPeople(String name,Integer age){
        People people = new People();
        people.setName(name);
        people.setAge(age);
        return people;
    }

    @Override
    public String toString() {
        return "People{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

}
